package com.hxy.tlias.service.impl;

import com.github.pagehelper.Page;
import com.github.pagehelper.PageHelper;
import com.hxy.tlias.pojo.OperateLog;
import com.hxy.tlias.pojo.PageBean;
import com.hxy.tlias.mapper.OperateLogMapper;
import com.hxy.tlias.service.OperateLogService;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class OperateLogServiceImpl implements OperateLogService {
    @Autowired
    private OperateLogMapper operateLogMapper;

    public OperateLogServiceImpl() {
    }

    public PageBean logPage(Integer page, Integer pageSize) {
        PageHelper.startPage(page, pageSize);
        List<OperateLog> list = this.operateLogMapper.list();
        Page<OperateLog> p = (Page)list;
        return new PageBean(p.getTotal(), p.getResult());
    }
}
